/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package pkl53.view;

import java.awt.CardLayout;
import javax.swing.JOptionPane;
import javax.swing.JPanel;

/**
 *
 * @author HP G42 (RILLA)
 */
public class DataEntriUsahaPanel extends javax.swing.JPanel {
    private CardLayout card;
    private JPanel panel;

    /**
     * Creates new form DataEntriUsahaPanel
     */
    public DataEntriUsahaPanel() {
        initComponents();
        
    }
   public  void setmainFrame(JPanel panel){
        this.panel = panel;}
    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        backgroundLain1 = new pkl53.imageClass.BackgroundLain();
        jScrollPane1 = new javax.swing.JScrollPane();
        containerPanel = new javax.swing.JPanel();
        blok123Usaha1 = new pkl53.view.Blok123Usaha();
        blok4Usaha1 = new pkl53.view.Blok4Usaha();
        blok5abcUsaha1 = new pkl53.view.Blok5abcUsaha();
        blok5deUsaha1 = new pkl53.view.Blok5deUsaha();
        blok56Usaha1 = new pkl53.view.Blok56Usaha();
        blok78Usaha1 = new pkl53.view.Blok78Usaha();
        nextButton = new javax.swing.JButton();
        previousButton = new javax.swing.JButton();
        homeButton = new javax.swing.JButton();
        Save = new javax.swing.JButton();
        Submit = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();

        jScrollPane1.setOpaque(false);
        jScrollPane1.setPreferredSize(new java.awt.Dimension(1070, 1070));

        containerPanel.setBackground(new java.awt.Color(204, 255, 204));
        containerPanel.setOpaque(false);
        containerPanel.setLayout(new java.awt.CardLayout());
        containerPanel.add(blok123Usaha1, "card5");
        containerPanel.add(blok4Usaha1, "card3");
        containerPanel.add(blok5abcUsaha1, "card4");
        containerPanel.add(blok5deUsaha1, "card5");
        containerPanel.add(blok56Usaha1, "card6");
        containerPanel.add(blok78Usaha1, "card7");

        jScrollPane1.setViewportView(containerPanel);

        nextButton.setText("Next");
        nextButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                nextButtonActionPerformed(evt);
            }
        });

        previousButton.setText("Previous");
        previousButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                previousButtonActionPerformed(evt);
            }
        });

        homeButton.setText("Home");
        homeButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                homeButtonActionPerformed(evt);
            }
        });

        Save.setText("Save");
        Save.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                SaveActionPerformed(evt);
            }
        });

        Submit.setText("Submit");
        Submit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                SubmitActionPerformed(evt);
            }
        });

        jLabel1.setFont(new java.awt.Font("Tahoma", 1, 13)); // NOI18N
        jLabel1.setForeground(new java.awt.Color(255, 255, 255));
        jLabel1.setText("Data Entri");

        javax.swing.GroupLayout backgroundLain1Layout = new javax.swing.GroupLayout(backgroundLain1);
        backgroundLain1.setLayout(backgroundLain1Layout);
        backgroundLain1Layout.setHorizontalGroup(
            backgroundLain1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(backgroundLain1Layout.createSequentialGroup()
                .addGroup(backgroundLain1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(backgroundLain1Layout.createSequentialGroup()
                        .addGap(128, 128, 128)
                        .addGroup(backgroundLain1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(backgroundLain1Layout.createSequentialGroup()
                                .addComponent(Save, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(Submit, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(homeButton, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(previousButton, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(nextButton, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 1085, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(backgroundLain1Layout.createSequentialGroup()
                        .addGap(119, 119, 119)
                        .addComponent(jLabel1)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        backgroundLain1Layout.setVerticalGroup(
            backgroundLain1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, backgroundLain1Layout.createSequentialGroup()
                .addGap(0, 56, Short.MAX_VALUE)
                .addComponent(jLabel1)
                .addGap(18, 18, 18)
                .addGroup(backgroundLain1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(nextButton)
                    .addComponent(previousButton)
                    .addComponent(homeButton)
                    .addComponent(Submit)
                    .addComponent(Save))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 623, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(backgroundLain1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(backgroundLain1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );
    }// </editor-fold>//GEN-END:initComponents

    private void nextButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_nextButtonActionPerformed
        // TODO add your handling code here:
        card = (CardLayout) containerPanel.getLayout();
        card.next(containerPanel);
        jScrollPane1.getViewport().setViewPosition(new java.awt.Point(0,0));
    }//GEN-LAST:event_nextButtonActionPerformed

    private void previousButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_previousButtonActionPerformed
        // TODO add your handling code here:
        card = (CardLayout) containerPanel.getLayout();
        card.previous(containerPanel);
        jScrollPane1.getViewport().setViewPosition(new java.awt.Point(0,0));
    }//GEN-LAST:event_previousButtonActionPerformed

    private void homeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_homeButtonActionPerformed
        // TODO add your handling code here:
        card = (CardLayout) panel.getLayout();
        card.show(panel,"homePanel");

    }//GEN-LAST:event_homeButtonActionPerformed

    private void SaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_SaveActionPerformed
        // TODO add your handling code here:
        JOptionPane.showMessageDialog(null, "belum ada codingan ini tugas rama ");
    }//GEN-LAST:event_SaveActionPerformed

    private void SubmitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_SubmitActionPerformed
        // TODO add your handling code here:
        JOptionPane.showMessageDialog(null, "belum ada codingan ini tugas prima ");
    }//GEN-LAST:event_SubmitActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton Save;
    private javax.swing.JButton Submit;
    private pkl53.imageClass.BackgroundLain backgroundLain1;
    private pkl53.view.Blok123Usaha blok123Usaha1;
    private pkl53.view.Blok4Usaha blok4Usaha1;
    private pkl53.view.Blok56Usaha blok56Usaha1;
    private pkl53.view.Blok5abcUsaha blok5abcUsaha1;
    private pkl53.view.Blok5deUsaha blok5deUsaha1;
    private pkl53.view.Blok78Usaha blok78Usaha1;
    private javax.swing.JPanel containerPanel;
    private javax.swing.JButton homeButton;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JButton nextButton;
    private javax.swing.JButton previousButton;
    // End of variables declaration//GEN-END:variables
}
